<?php
namespace modules\setting\services\impl;

use modules\setting\model\Setting;
use modules\setting\services\SettingService;
use think\facade\Db;

/**
 * 系统设置服务接口
 * 系统设置增删改查
 * @package modules\setting\services\impl
 */
class SettingServiceImpl implements SettingService

{
    public function getSettingList(){
        // Setting::w
        
        // Setting::where('type','=','array')->select();
        // Db::where()
        // Db::where()
    }
    public function addSetting($name,$type, $data){
        Setting::create(['name'=>$name,'type'=>$type,'data'=>$data]);
    }
    public function updateSetting($name, $type, $data){
        Setting::where('name',$name)->update(['type'=>$type,'data'=>$data]);
    }
    public function deleteSetting($name){
        Setting::where('name',$name)->delete();
    }
}

